FROM openjdk:8u171-jdk-alpine
MAINTAINER hulk <29572320@qq.com>
RUN mkdir -p /app
WORKDIR /app
ADD ./target/ratel-web.jar ./app.jar
EXPOSE 19082
#COPY ratel-web.jar /app/app.jar
#VOLUME ["/app/logs"]
RUN apk add --no-cache tzdata
ENV TZ=Asia/Shanghai
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV JAVA_OPTS="-server -Xms2g -Xmx2g -Xss512k -XX:MetaspaceSize=256m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=logs/ -XX:+PrintGCDateStamps -verbose:gc -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -Xloggc:logs/gc-%t.log -Djava.security.egd=file:/dev/./urandom"
#ENV APP_OPTS $JAVA_OPTS -Dreactor.trace.operatorStacktrace=true
#ENTRYPOINT ["sh", "-c", "java $APP_OPTS -jar app.jar"]
ENTRYPOINT ["java", "$JAVA_OPTS", "-jar", "app.jar"]
CMD ["--spring.profiles.active=pro"]